package com.md.facade;

import com.md.api.OauthApi;
import com.md.application.service.OauthApplicationService;
import com.md.config.Logs;
import com.md.model.system.CommonResult;
import com.md.request.ReplacementTokenRequest;
import com.md.response.ReplacementTokenResponse;
import com.md.value.enums.OperationEnum;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class OauthController implements OauthApi {
  private final OauthApplicationService oauthApplicationService;

  @Override
  @Logs(title = "解析token", operation = OperationEnum.SELECT)
  public CommonResult<ReplacementTokenResponse> replacement(final ReplacementTokenRequest request) {
    return oauthApplicationService.replacement(request);
  }
}
